<?php
echo '<script type="text/javascript">';
require APP . WEBROOT_DIR . DS . "js" . DS . "validate" . DS . "pricetypes_service_index.js";
echo '</script>';
?>
<div class="pricetypesServices index">
    <h2><?php __('Configuración de Precios de Servicios'); ?></h2>
    <?php echo $this->Form->create('PricetypesService'); ?>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th>Servicio</th>
            <?php 
            foreach($pricetypes as $tipo){
                ?> 
            <th><?php echo $tipo['Pricetype']['name']?></th>
 <?php
            }
            ?>
        </tr>
        <?php
        $i = 0;

        foreach ($services as $service) {
                    $class = null;
                    if ($i++ % 2 == 0) {
                        $class = ' class="altrow"';
                    }
            ?> 
            <tr<?php echo $class; ?>>
                <td><?php echo $service['Service']['name']?></td>
                <?php
                foreach ($pricetypes as $tipo) {
                    ?>
                    <td><?php echo $this->Form->input('client_cost_' .$service['Service']['id'].'_'. $tipo['Pricetype']['id'], array('label' => false, 'div' => false, 'class' => 'validCost')); ?></td>
                <?php } ?>
            </tr>
            <?php
        }
        ?>
    </table>
    <?php echo $this->Form->end(__('Guardar', true)); ?>
</div>